package entry43.pre;

import java.util.ArrayList;
import java.util.List;

import org.junit.Test;

class Cheese {
}

public class CheeseStore {
	public enum Apple {
		FUJI, PIPPIN
	};

	private int amount = 300;

	public List<Cheese> getCheeses(int n) {
		if(amount < 100) {
			return null;
		}

		List<Cheese> list = new ArrayList<Cheese>();
		for (int i = 0; i < n; i++) {
			if (amount < 100) {
				break;
			}
			list.add(new Cheese());
			amount -= 100;
		}
		return list;
	}

	public void eat() {
		List<Cheese> list = getCheeses(3);

		if (list != null) {
			for (int i = 0; i < list.size(); i++) {
				System.out.println("냠냠");
			}
		}
	}

	@Test
	public void testEat() {
		eat();
		eat();
	}
}